/*
 * @Author: yx_ning
 * @Description:
 * @File: user_login
 * @Version: 1.0.0
 * @Date: 22/12/2023 下午2:05
 */
package user

import (
	v1 "gin-simple/api/v1"
	"gin-simple/middleware"
	"github.com/gin-gonic/gin"
)

func InitUserLoginRouter(Router *gin.RouterGroup) {
	userRouter := Router.Group("user")
	var loginApi = v1.ApiGroupApp.LoginApi
	{
		userRouter.POST("login", loginApi.Login)
		auth := userRouter.Use(middleware.JWTAuth())
		{
			auth.GET("/info", loginApi.GetUserInfo)
		}
	}
}
